package com.hsnn.medstgmini.pro.base.model.form;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "base_shortmedicine")
public class ShortMedicine implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String shortmedicine_id ; //'短缺申报id',
	private String drug_name; //'通用名',
	private String form_name;//'剂型',
	private String spec_name; //'规格',
	private Integer factor; // '转换系数',
	private String unit_name; //'包装单位',
	private String comp_name;// '生产企业',
	private String drug_attr; // '药品属性',
	private String short_date; // '短缺时间（月）',
	private Integer need_count; // '年需求量',
	private String drug_medicine;// '国药准字号',
	private String shortage_reason; // '缺货理由',
	private Date submit_datetime; // '申报日期',
	private Short submit_status;// '申报状态0其他1已申报2已撤销',
	private String remark;  //'申报备注',
	private Short  bid_flag; //'中标药品标识0非中标药品1中标药品',
	private String cancel_remark; //'撤销备注',
	private String hosp_code;//'医疗机构编码',
	private String hosp_name;//'医疗机构名称',
	private String hosp_spel_code; //'医疗机构名称拼音码',
	private Short  hosp_status;//'医疗机构状态',
	private Short modify_status; //'是否可以修改0不可以修改1可以修改',
	private Date upd_datetime; //'更新时间',
	private String upd_user;//'更新人',
	private Integer short_type;//短缺类型 
	
	
	public Integer getShort_type() {
		return short_type;
	}



	public void setShort_type(Integer short_type) {
		this.short_type = short_type;
	}



	public ShortMedicine() {
		
	}
	
	
	
	public ShortMedicine(String shortmedicine_id, String drug_name,
			String form_name, String spec_name, Integer factor,
			String unit_name, String comp_name, String drug_attr,
			String short_date, Integer need_count, String drug_medicine,
			String shortage_reason, Date submit_datetime, Short submit_status,
			String remark, Short bid_flag, String cancel_remark,
			String hosp_code, String hosp_name, String hosp_spel_code,
			Short hosp_status, Short modify_status, Date upd_datetime,
			String upd_user, Integer short_type) {
		super();
		this.shortmedicine_id = shortmedicine_id;
		this.drug_name = drug_name;
		this.form_name = form_name;
		this.spec_name = spec_name;
		this.factor = factor;
		this.unit_name = unit_name;
		this.comp_name = comp_name;
		this.drug_attr = drug_attr;
		this.short_date = short_date;
		this.need_count = need_count;
		this.drug_medicine = drug_medicine;
		this.shortage_reason = shortage_reason;
		this.submit_datetime = submit_datetime;
		this.submit_status = submit_status;
		this.remark = remark;
		this.bid_flag = bid_flag;
		this.cancel_remark = cancel_remark;
		this.hosp_code = hosp_code;
		this.hosp_name = hosp_name;
		this.hosp_spel_code = hosp_spel_code;
		this.hosp_status = hosp_status;
		this.modify_status = modify_status;
		this.upd_datetime = upd_datetime;
		this.upd_user = upd_user;
		this.short_type = short_type;
	}



	@Id
	@Column(name = "shortmedicine_id", nullable = false ,length = 36)
	public String getShortmedicine_id() {
		return shortmedicine_id;
	}
	public void setShortmedicine_id(String shortmedicine_id) {
		this.shortmedicine_id = shortmedicine_id;
	}
	@Column(name = "drug_name", length = 512)
	public String getDrug_name() {
		return drug_name;
	}
	public void setDrug_name(String drug_name) {
		this.drug_name = drug_name;
	}
	@Column(name = "form_name", length = 100)
	public String getForm_name() {
		return form_name;
	}
	public void setForm_name(String form_name) {
		this.form_name = form_name;
	}
	@Column(name = "spec_name", length = 100)
	public String getSpec_name() {
		return spec_name;
	}
	public void setSpec_name(String spec_name) {
		this.spec_name = spec_name;
	}
	@Column(name = "factor")
	public Integer getFactor() {
		return factor;
	}
	public void setFactor(Integer factor) {
		this.factor = factor;
	}
	@Column(name = "unit_name", length = 100)
	public String getUnit_name() {
		return unit_name;
	}
	public void setUnit_name(String unit_name) {
		this.unit_name = unit_name;
	}
	@Column(name = "comp_name", length = 250)
	public String getComp_name() {
		return comp_name;
	}
	public void setComp_name(String comp_name) {
		this.comp_name = comp_name;
	}
	@Column(name = "drug_attr", length = 100)
	public String getDrug_attr() {
		return drug_attr;
	}
	public void setDrug_attr(String drug_attr) {
		this.drug_attr = drug_attr;
	}
	@Column(name = "short_date")
	public String getShort_date() {
		return short_date;
	}
	public void setShort_date(String short_date) {
		this.short_date = short_date;
	}
	@Column(name = "need_count")
	public Integer getNeed_count() {
		return need_count;
	}
	public void setNeed_count(Integer need_count) {
		this.need_count = need_count;
	}
	@Column(name = "drug_medicine", length = 64)
	public String getDrug_medicine() {
		return drug_medicine;
	}
	public void setDrug_medicine(String drug_medicine) {
		this.drug_medicine = drug_medicine;
	}
	@Column(name = "shortage_reason", length = 2000)
	public String getShortage_reason() {
		return shortage_reason;
	}
	public void setShortage_reason(String shortage_reason) {
		this.shortage_reason = shortage_reason;
	}
	@Column(name = "submit_datetime")
	public Date getSubmit_datetime() {
		return submit_datetime;
	}
	public void setSubmit_datetime(Date submit_datetime) {
		this.submit_datetime = submit_datetime;
	}
	@Column(name = "submit_status")
	public Short getSubmit_status() {
		return submit_status;
	}
	public void setSubmit_status(Short submit_status) {
		this.submit_status = submit_status;
	}
	@Column(name = "remark" , length = 2000)
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "bid_flag")
	public Short getBid_flag() {
		return bid_flag;
	}
	public void setBid_flag(Short bid_flag) {
		this.bid_flag = bid_flag;
	}
	@Column(name = "cancel_remark" , length =2000)
	public String getCancel_remark() {
		return cancel_remark;
	}
	public void setCancel_remark(String cancel_remark) {
		this.cancel_remark = cancel_remark;
	}
	@Column(name = "hosp_code" , length =50)
	public String getHosp_code() {
		return hosp_code;
	}
	public void setHosp_code(String hosp_code) {
		this.hosp_code = hosp_code;
	}
	@Column(name = "hosp_name" , length =128)
	public String getHosp_name() {
		return hosp_name;
	}
	public void setHosp_name(String hosp_name) {
		this.hosp_name = hosp_name;
	}
	@Column(name = "hosp_spel_code" , length =128)
	public String getHosp_spel_code() {
		return hosp_spel_code;
	}
	public void setHosp_spel_code(String hosp_spel_code) {
		this.hosp_spel_code = hosp_spel_code;
	}
	@Column(name = "hosp_status")
	public Short getHosp_status() {
		return hosp_status;
	}
	public void setHosp_status(Short hosp_status) {
		this.hosp_status = hosp_status;
	}
	@Column(name = "modify_status")
	public Short getModify_status() {
		return modify_status;
	}
	public void setModify_status(Short modify_status) {
		this.modify_status = modify_status;
	}
	@Column(name = "upd_datetime")
	public Date getUpd_datetime() {
		return upd_datetime;
	}
	public void setUpd_datetime(Date upd_datetime) {
		this.upd_datetime = upd_datetime;
	}
	@Column(name = "hosp_spel_code" , length =36)
	public String getUpd_user() {
		return upd_user;
	}
	public void setUpd_user(String upd_user) {
		this.upd_user = upd_user;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((bid_flag == null) ? 0 : bid_flag.hashCode());
		result = prime * result
				+ ((cancel_remark == null) ? 0 : cancel_remark.hashCode());
		result = prime * result
				+ ((comp_name == null) ? 0 : comp_name.hashCode());
		result = prime * result
				+ ((drug_attr == null) ? 0 : drug_attr.hashCode());
		result = prime * result
				+ ((drug_medicine == null) ? 0 : drug_medicine.hashCode());
		result = prime * result
				+ ((drug_name == null) ? 0 : drug_name.hashCode());
		result = prime * result + ((factor == null) ? 0 : factor.hashCode());
		result = prime * result
				+ ((form_name == null) ? 0 : form_name.hashCode());
		result = prime * result
				+ ((hosp_code == null) ? 0 : hosp_code.hashCode());
		result = prime * result
				+ ((hosp_name == null) ? 0 : hosp_name.hashCode());
		result = prime * result
				+ ((hosp_spel_code == null) ? 0 : hosp_spel_code.hashCode());
		result = prime * result
				+ ((hosp_status == null) ? 0 : hosp_status.hashCode());
		result = prime * result
				+ ((modify_status == null) ? 0 : modify_status.hashCode());
		result = prime * result
				+ ((need_count == null) ? 0 : need_count.hashCode());
		result = prime * result + ((remark == null) ? 0 : remark.hashCode());
		result = prime * result
				+ ((short_date == null) ? 0 : short_date.hashCode());
		result = prime * result
				+ ((short_type == null) ? 0 : short_type.hashCode());
		result = prime * result
				+ ((shortage_reason == null) ? 0 : shortage_reason.hashCode());
		result = prime
				* result
				+ ((shortmedicine_id == null) ? 0 : shortmedicine_id.hashCode());
		result = prime * result
				+ ((spec_name == null) ? 0 : spec_name.hashCode());
		result = prime * result
				+ ((submit_datetime == null) ? 0 : submit_datetime.hashCode());
		result = prime * result
				+ ((submit_status == null) ? 0 : submit_status.hashCode());
		result = prime * result
				+ ((unit_name == null) ? 0 : unit_name.hashCode());
		result = prime * result
				+ ((upd_datetime == null) ? 0 : upd_datetime.hashCode());
		result = prime * result
				+ ((upd_user == null) ? 0 : upd_user.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ShortMedicine other = (ShortMedicine) obj;
		if (bid_flag == null) {
			if (other.bid_flag != null)
				return false;
		} else if (!bid_flag.equals(other.bid_flag))
			return false;
		if (cancel_remark == null) {
			if (other.cancel_remark != null)
				return false;
		} else if (!cancel_remark.equals(other.cancel_remark))
			return false;
		if (comp_name == null) {
			if (other.comp_name != null)
				return false;
		} else if (!comp_name.equals(other.comp_name))
			return false;
		if (drug_attr == null) {
			if (other.drug_attr != null)
				return false;
		} else if (!drug_attr.equals(other.drug_attr))
			return false;
		if (drug_medicine == null) {
			if (other.drug_medicine != null)
				return false;
		} else if (!drug_medicine.equals(other.drug_medicine))
			return false;
		if (drug_name == null) {
			if (other.drug_name != null)
				return false;
		} else if (!drug_name.equals(other.drug_name))
			return false;
		if (factor == null) {
			if (other.factor != null)
				return false;
		} else if (!factor.equals(other.factor))
			return false;
		if (form_name == null) {
			if (other.form_name != null)
				return false;
		} else if (!form_name.equals(other.form_name))
			return false;
		if (hosp_code == null) {
			if (other.hosp_code != null)
				return false;
		} else if (!hosp_code.equals(other.hosp_code))
			return false;
		if (hosp_name == null) {
			if (other.hosp_name != null)
				return false;
		} else if (!hosp_name.equals(other.hosp_name))
			return false;
		if (hosp_spel_code == null) {
			if (other.hosp_spel_code != null)
				return false;
		} else if (!hosp_spel_code.equals(other.hosp_spel_code))
			return false;
		if (hosp_status == null) {
			if (other.hosp_status != null)
				return false;
		} else if (!hosp_status.equals(other.hosp_status))
			return false;
		if (modify_status == null) {
			if (other.modify_status != null)
				return false;
		} else if (!modify_status.equals(other.modify_status))
			return false;
		if (need_count == null) {
			if (other.need_count != null)
				return false;
		} else if (!need_count.equals(other.need_count))
			return false;
		if (remark == null) {
			if (other.remark != null)
				return false;
		} else if (!remark.equals(other.remark))
			return false;
		if (short_date == null) {
			if (other.short_date != null)
				return false;
		} else if (!short_date.equals(other.short_date))
			return false;
		if (short_type == null) {
			if (other.short_type != null)
				return false;
		} else if (!short_type.equals(other.short_type))
			return false;
		if (shortage_reason == null) {
			if (other.shortage_reason != null)
				return false;
		} else if (!shortage_reason.equals(other.shortage_reason))
			return false;
		if (shortmedicine_id == null) {
			if (other.shortmedicine_id != null)
				return false;
		} else if (!shortmedicine_id.equals(other.shortmedicine_id))
			return false;
		if (spec_name == null) {
			if (other.spec_name != null)
				return false;
		} else if (!spec_name.equals(other.spec_name))
			return false;
		if (submit_datetime == null) {
			if (other.submit_datetime != null)
				return false;
		} else if (!submit_datetime.equals(other.submit_datetime))
			return false;
		if (submit_status == null) {
			if (other.submit_status != null)
				return false;
		} else if (!submit_status.equals(other.submit_status))
			return false;
		if (unit_name == null) {
			if (other.unit_name != null)
				return false;
		} else if (!unit_name.equals(other.unit_name))
			return false;
		if (upd_datetime == null) {
			if (other.upd_datetime != null)
				return false;
		} else if (!upd_datetime.equals(other.upd_datetime))
			return false;
		if (upd_user == null) {
			if (other.upd_user != null)
				return false;
		} else if (!upd_user.equals(other.upd_user))
			return false;
		return true;
	}


	

	
	
}
